php coders?

Search

New member
Joined
Sep 21, 2004
Messages
4,935
Tokens
who here knows php? im trying to make an archives section where the list would populate itself when and html file is put in a certain folder... im trying to do this without a database

i thought this would work

<?php


include ("$p.html");

?>

am i missing something?:icon_conf
 

New member
Joined
Sep 21, 2004
Messages
4,935
Tokens
nevermind, i figured it out using a flat file

Code:
 <?php
 $fp = fopen('file.html','r');
 if (!$fp) {echo 'ERROR: Unable to open file.</table></body></html>'; exit;}
 
 while (!feof($fp)) {
 $line = fgets($fp, 1024); //use 2048 if very long lines
 list ($field1) = split ('\|', $line);
 echo '
 <tr>
 <td>'.$field1.'</td>
 </tr>';
 $fp++;
 }
 
 fclose($fp);
 
 ?>
 

Forum statistics

Threads
1,119,830
Messages
13,573,737
Members
100,877
Latest member
kiemt5385
The RX is the sports betting industry's leading information portal for bonuses, picks, and sportsbook reviews. Find the best deals offered by a sportsbook in your state and browse our free picks section.FacebookTwitterInstagramContact Usforum@therx.com